package org.happycomp.radio;

import org.happycomp.radio.downloader.DownloadingItem;

/**
 * Trida ridi ukladani rozpracovaneho stavu
 * @author pavels
 */
public interface StoreState {

	/**
	 * Ulozi jednu polozku 
	 * @param item Polozka k ulozeni
	 * @throws StoreStateException Vyjimka pri ukladani
	 */
	public void storeDownloadingItem(DownloadingItem item) throws StoreStateException;

	/**
	 * Smaz ulozenou polozku 
	 * @param item Ulozena polozka 
	 * @throws StoreStateException Vyjimka pri mazani
	 */
	public void deleteDownloadingItem(DownloadingItem item) throws StoreStateException;

	/**
	 * Vraci vsechny ulozene polozky	
	 * @return
	 * @throws StoreStateException
	 */
	public DownloadingItem[] getDownloadingItems() throws StoreStateException;
	
	public void updateDownloadingItem(DownloadingItem item) throws StoreStateException;
}
